private var box:GameObject;
private var moveSpeed:float = 10.0;

function Start(){
	box = GameObject.Find("Cube");
}

function Update () {
}

function OnGUI(){
	if( GUI.RepeatButton( Rect( 0, 0, 50, 30 ), "<" ) )
	{
		Debug.Log( "<" );
		box.transform.Translate( Vector3.left * moveSpeed * Time.deltaTime );
	}
		
	if( GUI.RepeatButton( Rect( 50, 0, 50, 30 ), ">" ) )
	{
		Debug.Log( ">" );
		box.transform.Translate( Vector3.right * moveSpeed * Time.deltaTime );
	}
	
	if( GUI.Button( Rect( 100, 0, 50, 30 ), "Fire" ) )
	{
		Debug.Log( "Fire" );
		var sphere:GameObject = GameObject.CreatePrimitive( PrimitiveType.Sphere );
		sphere.transform.position = box.transform.position + Vector3( 0, box.transform.localScale.y, 0 );
	}
}